

//省
import 'cities.dart';

class Provinces {
  Provinces({
    this.code,
    this.name,
    this.children,
  });

  String code;
  String name;
  List<Cities> children;

  factory Provinces.fromJson(Map<String, dynamic> json) => Provinces(
    code: json["code"],
    name: json["name"],
    children: List<Cities>.from(json["children"].map((x) => Cities.fromJson(x))),
  );

  Map<String, dynamic> toJson() => {
    "code": code,
    "name": name,
    "children": List<dynamic>.from(children.map((x) => x.toJson())),
  };
}